package com.web.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.web.mapper.ContractMapper;
import com.web.pojo.Contract;
import com.web.service.ContractService;

@Service
public class ContractServiceImpl implements  ContractService {
	@Autowired
	private ContractMapper contractMapper;

	//全部查询合同
	@Override
	public List<Contract> listContract() {
		return contractMapper.listContract();
	}
	//用户名称查询合同
	@Override
	public List<Contract> ContractByUserName(String userName) {
		return contractMapper.contractByUserName(userName);
	}
	//区域查询合同
	@Override
	public List<Contract> ContractByAreaName(String areaName) {
		return contractMapper.contractByAreaName(areaName);
	}
	//合同ID查询合同
	@Override
	public Contract ContractByContractID(String contractID) {
		// TODO Auto-generated method stub
		return contractMapper.contractByContractID(contractID);
	}
	//根据contractID更新订单
	@Override
	public boolean ContractUpdateBycontractID(Contract contract) {
		// TODO Auto-generated method stub
		return contractMapper.contractUpdateBycontractID(contract);
	}
	//根据合同ID删除合同
	@Override
	public boolean deleteByContractID(String contractID) {
		// TODO Auto-generated method stub
		return contractMapper.deleteByContractID(contractID);
	}

}
